home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.1 KB | 72 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 4110420 12-April-90 13:08PDT
-
- From: POWERUP.ENG Power Up Software,PRT
-
- To: D3085 Progressive Computing, D Lucky,PRT
- MACAPP.TECH$ MacApp Technical
-
- Sub: RE>Dimming TEditText fiel
-
- Attn: Progressive Computing, D Lucky
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Date 4/5/90
- Subject RE>Dimming TEditText fields
- From James Plamondon
- To Progressive Computing, D Lucky
- CC MacApp.Tech$
-
- Reply to: RE>Dimming TEditText fields
- Dave,
-
- My quick response is as follows:
-
- You can't do the obvious overrides of ViewEnable(), DimState(), and Dim(), in
- which each calls the other, because you'll fall into an infinite loop:
-
- PROCEDURE TYourEditText.ViewEnable(state, redraw: BOOLEAN);
- BEGIN
- INHERITED ViewEnable(state, kDontRedraw);
- DimState(NOT state, redraw);
- END;
-
- PROCEDURE TYourEditText.DimState(state, redraw: BOOLEAN);
- BEGIN
- INHERITED DimState(state, kDontRedraw);
- ViewEnable(NOT state, redraw);
- END;
-
- You could do it if you could revise the code as follows:
-
- PROCEDURE TYourEditText.ViewEnable(state, redraw: BOOLEAN);
- BEGIN
- INHERITED ViewEnable(state, kDontRedraw);
- INHERITED DimState(NOT state, redraw);
- END;
-
- PROCEDURE TYourEditText.DimState(state, redraw: BOOLEAN);
- BEGIN
- INHERITED DimState(state, kDontRedraw);
- INHERITED ViewEnable(NOT state, redraw);
- END;
-
- …but I don't know if that will work — calling INHERITED ProcName() from some
- method other than ProcName() may be disallowed, seems kinda weird if it is
- allowed, and makes me wonder exactly what version of ProcName() you'd end up
- calling if it were allowed.
-
- The quick-and-dirty alternative is to write a new method, called
- SetAccessState(state), which calls both ViewEnable(state) and DimState(NOT
- state), and call this anywhere you would otherwise call ViewEnable() or
- DimState(). This doesn't help in those cases where the system calls these
- routines, however.
-
- Looking forward to an instance variable in TControl called fDimOnDisable, I am
-
- Yours,
-
- James Plamondon
-
-